# -*- coding: utf-8 -*-(for Scipe)
# transform a control $stick -> control variable $var
#uses parameters for the exponential, dual-rate, trim   
# example $stick=2 $var=ail
DEF  $stick $var  #sensibility control
$var.exp: INIT 30 
$var.rate: INIT 100 # normal full rate
$var.rate: INIT  50  @S6 # reduced rate with switch @S6
x  =  0
x EXP  @M$stick $var.exp: 
x MULT% x $var.rate:
$var.trim: INIT 0
DTRIM$stick  $var.trim: #link this parameter to a digital trim
IF @BA   #autotrim
	UPD $var.trim: x
ENDIF	
$var ADD  $var.trim:  x  #this is a simple additive correction

